Import portable browser profile data - #229
Open
IlyaasK wants to merge 4 commits into
Open
Conversation
Import bookmarks, recent history, local storage, and selected Web Store extensions alongside cookies. Keep values local until final approval, enforce the API payload bounds in the CLI, and apply extension entitlements before upload.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 60febc7. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Extend
kernel profiles import-localbeyond cookies to import approved portable browser data from Chrome and Helium on macOS:--dayswindow, selected by defaultPasswords and supported TOTP seeds remain a separate Managed Auth step. IndexedDB, cache, arbitrary preferences, and extension state are intentionally excluded.
Why
A useful imported profile needs more than cookies. This keeps the moment-to-magic flow simple while preserving a portable, bounded contract and making sensitive categories visible before upload. History uses actual visits in the chosen time window instead of lifetime URL counters.
How
cookies_importedJSON field while adding per-category resultsDepends on kernel/kernel PR #3244 for server-side extension persistence and entitlement enforcement.
Verification
go test ./internal/browserimport ./cmd -count=1go vet ./internal/browserimport ./cmdgo mod tidy -diffgit diff --checkmake buildNote
Medium Risk
Touches sensitive local browser data (cookies, history, storage) and upload paths with new decryption/export timing; connector env injection affects auth for kernel:// launches.
Overview
kernel profiles import-localnow imports bookmarks, browsing history (within--days, default on via--history), and localStorage in addition to cookies, not just cookies.The flow gathers metadata first (counts/sizes), lets users multi-select categories and trim localStorage origins when total size exceeds 64 MiB, then shows a summary and confirmation before decrypting cookies and exporting values. Upload uses
BuildProfileBundlewith inventory/selection categories ordered cookies → storage → bookmarks → history; JSON output addsbrowser_data_importedwhile keepingcookies_imported.internal/browserimportadds Chromium readers for Bookmarks, History (SQLite snapshots), and LevelDB local storage (with origin filtering and size caps), plus bundle encoding limits (records, per-file MiB, 128 MiB bundle).goleveldbis a new dependency.internal/connectormacOS handler now exportsKERNEL_*env vars from launchctl before running the CLI so deep-linked imports inherit auth config.Extension import mentioned in the PR description is not in this diff.
Reviewed by Cursor Bugbot for commit b2201c8. Bugbot is set up for automated code reviews on this repo. Configure here.